// Programming_Scala/src/ch03/match-type-script.java

val sundries = List( 23, "Hello", 8.5, 'q' )

for( sundry <- sundries ) {
  sundry match {
    case i: Int => println( "got an Integer: " + i )
    case s: String => println( "got a String: " + s )
    case d: Double => println( "got a Double: " + d )
    case other => println( "got something else: " + other )
  }
}
